package com.foxie.scanner;

import java.util.Scanner;

public class ScannerDemo1 {
    public static void main(String[] args) {
        printUserInfo();
    }
    public static void printUserInfo( ) {
        Scanner sc = new Scanner(System.in);

        System.out.println("请输入姓名：");
        String name = sc.next();
        System.out.println("请输入年龄：");
        int age = sc.nextInt();

        System.out.println("姓名：" + name + "，年龄：" + age);
    }
}
